<template>
    <div class="segment-content-box">
        <a-tabs v-model:activeKey="tabsModeValue" >
            <a-tab-pane key="人员和文件信息" tab="人员和文件信息">
                <a-collapse v-model:activeKey="collapseActiveKeyArr" class="tabs-collapse-box">
                    <a-collapse-panel key="1" header="审评人员信息">
                        <commpVxeTable
                            :key="inspectorsRefresh"
                            :config="inspectorsConfig" 
                            :columns="inspectorsColumns"
                            :formItem="[]" 
                            :adaptiveHeight="true"
                        > 
                            <!-- <template v-slot:fwjccmc_slots="{row}" data-desc="自定操作栏">
                                <span>{{ row.fwjxsmc }}{{ row.fwjlx }}</span>
                            </template> -->
                        </commpVxeTable>
                    </a-collapse-panel>
                    <!-- ================ -->
                    <a-collapse-panel key="2" header="审评方案信息">
                        <commpVxeTable
                            :key="inspectionPlanRefresh"
                            :config="inspectionPlanConfig" 
                            :columns="inspectionPlanColumns"
                            :formItem="[]" 
                            :adaptiveHeight="true"
                        > 
                            <template v-slot:fwjccmc_slots="{row}" data-desc="自定操作栏">
                                <span>{{ row.fwjxsmc }}{{ row.fwjlx }}</span>
                            </template>
                            <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                <a-form layout="inline" class="search-form" >
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="viewClick(row)" >查看</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="!flowPathParameter.readOnlyDocument">
                                        <a-button class="blue-btn dMould-btn" type="primary" @click="producerMould(row,'审评方案信息','审评方案信息')" >选择模板</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="!flowPathParameter.readOnlyDocument && editMode == '服务端模式'">
                                        <a-button class="blue-btn" type="primary" @click="serverEdit(row)" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.readOnlyDocument && row.fwjlx !== '.pdf' && editMode == '客户端模式'">
                                        <a-button class="blue-btn" type="primary" @click="editClick(row,'审评方案信息')" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item  v-if="!flowPathParameter.readOnlyDocument && row.fwjlx == '.pdf' && editMode == '客户端模式'">
                                        <a-button class="blue-btn dMould-btn" type="primary" @click="againEdit(row,'审评方案信息')" >重新编辑</a-button>
                                    </a-form-item>
                                    
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.readOnlyDocument">
                                        <a-button class="red-btn" type="primary" @click="deleteClick(row,'审评方案信息')" >删除</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.readOnlyDocument">
                                        <a-upload style="display: inline-block;" :beforeUpload="segmentBeforeUpload" action="" @change="uploadClick($event,row,'审评方案信息')">
                                            <a-button class="blue-btn" type="primary">上传</a-button>
                                        </a-upload>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="downloadClick(row,'审评方案信息')" >下载</a-button>
                                    </a-form-item>
                                </a-form>
                            </template>
                        </commpVxeTable>
                    </a-collapse-panel>
                    <a-collapse-panel key="9" header="审评整改材料要求" class="collapse-panel-head-l255">
                        <commpVxeTable
                            :key="rectificationRefresh"
                            :config="rectificationConfig" 
                            :columns="rectificationColumns"
                            :formItem="[]" 
                            :adaptiveHeight="true"
                        > 
                            <template v-slot:fwjccmc_slots="{row}" data-desc="自定操作栏">
                                <span>{{ row.fwjxsmc }}{{ row.fwjlx }}</span>
                            </template>
                            <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                <a-form layout="inline" class="search-form" >
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="viewClick(row)" >查看</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="editMode == '服务端模式'">
                                        <!-- 服务端编辑 -->
                                        <a-button class="blue-btn" type="primary" @click="serverEdit(row)" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="row.fwjlx !== '.pdf' && editMode == '客户端模式'">
                                        <a-button class="blue-btn" type="primary" @click="editClick(row,'审评整改材料要求')" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item  v-if="row.fwjlx == '.pdf' && editMode == '客户端模式'">
                                            <a-button class="blue-btn dMould-btn" type="primary" @click="againEdit(row,'审评整改材料要求')" >重新编辑</a-button>
                                    </a-form-item>
                                    <!-- <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-button class="red-btn" type="primary" @click="deleteClick(row,'审评整改材料要求')" >删除</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-upload style="display: inline-block;" :beforeUpload="segmentBeforeUpload" action="" @change="uploadClick($event,row,'审评整改材料要求')">
                                            <a-button class="blue-btn" type="primary">上传</a-button>
                                        </a-upload>
                                    </a-form-item> -->
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="downloadClick(row,'审评整改材料要求')" >下载</a-button>
                                    </a-form-item>
                                </a-form>
                            </template>
                        </commpVxeTable>
                    </a-collapse-panel>

                    <!-- ======================== -->
                    <a-collapse-panel key="5" header="无利益冲突声明">
                        <!-- <template #extra>
                            <span v-if="collapseActiveKeyArr.indexOf('5') !== -1" 
                            @click="collapseActiveKeyArr = collapseActiveKeyArr.filter(item => item !== '5')">折叠</span>
                            <span v-else @click="collapseActiveKeyArr.push('5')">展开</span>
                        </template>-->
                        <a-form layout="inline" style="margin-bottom:10px" v-if="!flowPathParameter.isHidden">
                            <a-form-item >
                                <a-button class="blue-btn" type="primary" @click="generateRecord('无利益冲突声明','无利益冲突声明')">生成记录</a-button>
                            </a-form-item>
                        </a-form>
                        <commpVxeTable
                            :key="noConflictOfInterestRefresh"
                            :config="noConflictOfInterestConfig" 
                            :columns="noConflictOfInterestColumns"
                            :formItem="[]" 
                            :adaptiveHeight="true"
                        > 
                            <template v-slot:fwjccmc_slots="{row}" data-desc="自定操作栏">
                                <span>{{ row.fwjxsmc }}{{ row.fwjlx }}</span>
                            </template>
                            <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                <a-form layout="inline" class="search-form" >
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="viewClick(row)" >查看</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="!flowPathParameter.readOnlyDocument">
                                        <a-button class="blue-btn dMould-btn" type="primary" @click="producerMould(row,'无利益冲突声明','无利益冲突声明')" >选择模板</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="editMode == '服务端模式'">
                                        <!-- 服务端编辑 -->
                                        <a-button class="blue-btn" type="primary" @click="serverEdit(row)" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="row.fwjlx !== '.pdf' && editMode == '客户端模式'">
                                        <a-button class="blue-btn" type="primary" @click="editClick(row,'无利益冲突声明')" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item  v-if="row.fwjlx == '.pdf' && editMode == '客户端模式'">
                                            <a-button class="blue-btn dMould-btn" type="primary" @click="againEdit(row,'无利益冲突声明')" >重新编辑</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-button class="red-btn" type="primary" @click="deleteClick(row,'无利益冲突声明')" >删除</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-upload style="display: inline-block;" :beforeUpload="segmentBeforeUpload" action="" @change="uploadClick($event,row,'无利益冲突声明')">
                                            <a-button class="blue-btn" type="primary">上传</a-button>
                                        </a-upload>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="downloadClick(row,'无利益冲突声明')" >下载</a-button>
                                    </a-form-item>
                                </a-form>
                            </template>
                        </commpVxeTable>
                    </a-collapse-panel>
                    <a-collapse-panel key="6" header="技术审评纪律">
                        <!-- <template #extra>
                            <span v-if="collapseActiveKeyArr.indexOf('6') !== -1" 
                            @click="collapseActiveKeyArr = collapseActiveKeyArr.filter(item => item !== '6')">折叠</span>
                            <span v-else @click="collapseActiveKeyArr.push('6')">展开</span>
                        </template>-->
                        <a-form layout="inline" style="margin-bottom:10px" v-if="!flowPathParameter.isHidden">
                            <a-form-item >
                                <a-button class="blue-btn" type="primary" @click="generateRecord('技术审评纪律','技术审评纪律')">生成记录</a-button>
                            </a-form-item>
                        </a-form>
                        <commpVxeTable
                            :key="inspectionDisciplineRefresh"
                            :config="inspectionDisciplineConfig" 
                            :columns="inspectionDisciplineColumns"
                            :formItem="[]" 
                            :adaptiveHeight="true"
                        > 
                            <template v-slot:fwjccmc_slots="{row}" data-desc="自定操作栏">
                                <span>{{ row.fwjxsmc }}{{ row.fwjlx }}</span>
                            </template>
                            <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                <a-form layout="inline" class="search-form" >
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="viewClick(row)" >查看</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="!flowPathParameter.readOnlyDocument">
                                        <a-button class="blue-btn dMould-btn" type="primary" @click="producerMould(row,'技术审评纪律','技术审评纪律')" >选择模板</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="editMode == '服务端模式'">
                                        <!-- 服务端编辑 -->
                                        <a-button class="blue-btn" type="primary" @click="serverEdit(row)" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="row.fwjlx !== '.pdf' && editMode == '客户端模式'">
                                        <a-button class="blue-btn" type="primary" @click="editClick(row,'技术审评纪律')" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item  v-if="row.fwjlx == '.pdf' && editMode == '客户端模式'">
                                            <a-button class="blue-btn dMould-btn" type="primary" @click="againEdit(row,'技术审评纪律')" >重新编辑</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-button class="red-btn" type="primary" @click="deleteClick(row,'技术审评纪律')" >删除</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-upload style="display: inline-block;" :beforeUpload="segmentBeforeUpload" action="" @change="uploadClick($event,row,'技术审评纪律')">
                                            <a-button class="blue-btn" type="primary">上传</a-button>
                                        </a-upload>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="downloadClick(row,'技术审评纪律')" >下载</a-button>
                                    </a-form-item>
                                </a-form>
                            </template>
                        </commpVxeTable>
                    </a-collapse-panel>
                    <!-- ================== -->
                    <a-collapse-panel key="7" header="会议签到记录">
                        <!-- <template #extra>
                            <span v-if="collapseActiveKeyArr.indexOf('7') !== -1" 
                            @click="collapseActiveKeyArr = collapseActiveKeyArr.filter(item => item !== '7')">折叠</span>
                            <span v-else @click="collapseActiveKeyArr.push('7')">展开</span>
                        </template>-->
                        <a-form layout="inline" style="margin-bottom:10px" v-if="!flowPathParameter.isHidden">
                            <a-form-item >
                                <a-button class="blue-btn" type="primary" @click="generateRecord('技术审评会议签到表','会议签到记录')">生成记录</a-button>
                            </a-form-item>
                        </a-form>
                        <commpVxeTable
                            :key="minutesOfTheMeetingRefresh"
                            :config="minutesOfTheMeetingConfig" 
                            :columns="minutesOfTheMeetingColumns"
                            :formItem="[]" 
                            :adaptiveHeight="true"
                        > 
                            <template v-slot:fwjccmc_slots="{row}" data-desc="自定操作栏">
                                <span>{{ row.fwjxsmc }}{{ row.fwjlx }}</span>
                            </template>
                            <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                <a-form layout="inline" class="search-form" >
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="viewClick(row)" >查看</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="!flowPathParameter.readOnlyDocument">
                                        <a-button class="blue-btn dMould-btn" type="primary" @click="producerMould(row,'会议签到记录','会议签到记录')" >选择模板</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="editMode == '服务端模式'">
                                        <!-- 服务端编辑 -->
                                        <a-button class="blue-btn" type="primary" @click="serverEdit(row)" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="row.fwjlx !== '.pdf' && editMode == '客户端模式'">
                                        <a-button class="blue-btn" type="primary" @click="editClick(row,'会议签到记录')" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item  v-if="row.fwjlx == '.pdf' && editMode == '客户端模式'">
                                            <a-button class="blue-btn dMould-btn" type="primary" @click="againEdit(row,'会议签到记录')" >重新编辑</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-button class="red-btn" type="primary" @click="deleteClick(row,'会议签到记录')" >删除</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-upload style="display: inline-block;" :beforeUpload="segmentBeforeUpload" action="" @change="uploadClick($event,row,'会议签到记录')">
                                            <a-button class="blue-btn" type="primary">上传</a-button>
                                        </a-upload>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="downloadClick(row,'会议签到记录')" >下载</a-button>
                                    </a-form-item>
                                </a-form>
                            </template>
                        </commpVxeTable>
                    </a-collapse-panel>
                    <a-collapse-panel key="8" header="技术审评员承诺书">
                        <!-- <template #extra>
                            <span v-if="collapseActiveKeyArr.indexOf('8') !== -1" 
                            @click="collapseActiveKeyArr = collapseActiveKeyArr.filter(item => item !== '8')">折叠</span>
                            <span v-else @click="collapseActiveKeyArr.push('8')">展开</span>
                        </template>-->
                        <a-form layout="inline" style="margin-bottom:10px" v-if="!flowPathParameter.isHidden">
                            <a-form-item >
                                <a-button class="blue-btn" type="primary" @click="generateRecord('技术审评审评员承诺书','技术审评员承诺书')">生成记录</a-button>
                            </a-form-item>
                        </a-form>
                        <commpVxeTable
                            :key="letterOfCommitmentRefresh"
                            :config="letterOfCommitmentConfig" 
                            :columns="letterOfCommitmentColumns"
                            :formItem="[]" 
                            :adaptiveHeight="true"
                        > 
                            <template v-slot:fwjccmc_slots="{row}" data-desc="自定操作栏">
                                <span>{{ row.fwjxsmc }}{{ row.fwjlx }}</span>
                            </template>
                            <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                <a-form layout="inline" class="search-form" >
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="viewClick(row)" >查看</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="!flowPathParameter.readOnlyDocument">
                                        <a-button class="blue-btn dMould-btn" type="primary" @click="producerMould(row,'技术审评员承诺书','技术审评员承诺书')" >选择模板</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="editMode == '服务端模式'">
                                        <!-- 服务端编辑 -->
                                        <a-button class="blue-btn" type="primary" @click="serverEdit(row)" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="row.fwjlx !== '.pdf' && editMode == '客户端模式'">
                                        <a-button class="blue-btn" type="primary" @click="editClick(row,'技术审评员承诺书')" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item  v-if="row.fwjlx == '.pdf' && editMode == '客户端模式'">
                                            <a-button class="blue-btn dMould-btn" type="primary" @click="againEdit(row,'技术审评员承诺书')" >重新编辑</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-button class="red-btn " type="primary" @click="deleteClick(row,'技术审评员承诺书')" >删除</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-upload style="display: inline-block;" :beforeUpload="segmentBeforeUpload" action="" @change="uploadClick($event,row,'会议签到记录')">
                                            <a-button class="blue-btn" type="primary">上传</a-button>
                                        </a-upload>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="downloadClick(row,'技术审评员承诺书')" >下载</a-button>
                                    </a-form-item>
                                </a-form>
                            </template>
                        </commpVxeTable>
                    </a-collapse-panel>
                    <a-collapse-panel key="9" header="廉洁自律和满意度调查表" class="collapse-panel-head-l380">
                        <!-- <template #extra>
                            <span v-if="collapseActiveKeyArr.indexOf('7') !== -1" @click="collapseActiveKeyArr = collapseActiveKeyArr.filter(item => item !== '7')">折叠</span>
                            <span v-else @click="collapseActiveKeyArr.push('7')">展开</span>
                        </template>-->
                        <a-form layout="inline" style="margin-bottom:10px" v-if="!flowPathParameter.isHidden">
                            <a-form-item >
                                <a-button class="blue-btn" type="primary" @click="generateRecord('廉洁自律和满意度调查表','廉洁自律和满意度调查表')">生成记录</a-button>
                            </a-form-item>
                        </a-form>
                        <commpVxeTable
                            :key="satisfactionRefresh"
                            :config="satisfactionConfig" 
                            :columns="satisfactionColumns"
                            :formItem="[]" 
                            :adaptiveHeight="true"
                        > 
                            <template v-slot:fwjccmc_slots="{row}" data-desc="自定操作栏">
                                <span>{{ row.fwjxsmc }}{{ row.fwjlx }}</span>
                            </template>
                            <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                <a-form layout="inline" class="search-form" >
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="viewClick(row)" >查看</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="!flowPathParameter.readOnlyDocument">
                                        <a-button class="blue-btn dMould-btn" type="primary" @click="producerMould(row,'廉洁自律和满意度调查表','廉洁自律和满意度调查表')" >选择模板</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="editMode == '服务端模式'">
                                        <!-- 服务端编辑 -->
                                        <a-button class="blue-btn" type="primary" @click="serverEdit(row)" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="row.fwjlx !== '.pdf' && editMode == '客户端模式'">
                                        <a-button class="blue-btn" type="primary" @click="editClick(row,'廉洁自律和满意度调查表')" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item  v-if="row.fwjlx == '.pdf' && editMode == '客户端模式'">
                                            <a-button class="blue-btn dMould-btn" type="primary" @click="againEdit(row,'廉洁自律和满意度调查表')" >重新编辑</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-button class="red-btn " type="primary" @click="deleteClick(row,'廉洁自律和满意度调查表')" >删除</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-upload style="display: inline-block;" :beforeUpload="segmentBeforeUpload" action="" @change="uploadClick($event,row,'廉洁自律和满意度调查表')">
                                            <a-button class="blue-btn" type="primary">上传</a-button>
                                        </a-upload>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="downloadClick(row,'廉洁自律和满意度调查表')" >下载</a-button>
                                    </a-form-item>
                                </a-form>
                            </template>
                        </commpVxeTable>
                    </a-collapse-panel>
                </a-collapse>
            </a-tab-pane>
            <a-tab-pane :key="flowPathParameter.reviewProjectTab" :tab="flowPathParameter.reviewProjectTab">
                <div style="width: 100%;">
                    <a-row style="width: 100%;">
                        <a-col :span="5">
                            <div class="tree-left-box">
                                <a-tree
                                    v-model:checkedKeys="treeCheckedKeys"
                                    :autoExpandParent="true"
                                    :defaultExpandAll="true"
                                    :selectedKeys="selectedKeys"
                                    @select="treeSelect"
                                    :tree-data="treeData"
                                />
                            </div>
                            
                        </a-col>
                        <a-col :span="19">
                            <a-button class="blue-btn" type="primary" @click="UpdateInspectionItems()">更新审评项目</a-button>
                            <div class="tree-right-box">
                                <commpVxeTable
                                    :key="reviewItemsRefresh"
                                    :config="reviewItemsConfig" 
                                    :columns="reviewItemsColumns" 
                                    :formItem="reviewItemsFormItem"
                                    @tableUpdated="tableUpdated"
                                    ref="reviewItemsRef"
                                >
                                    <template v-slot:querButton="{row}">
                                        <vxe-button type="text" status="primary" content="查询所有缺陷" @click="queryAll"></vxe-button>
                                    </template>
                                    <template v-slot:name_ftype7="{row}" data-desc="自定操作栏">
                                        <div style="display: flex;height: 48px;align-items: center;">
                                            <i @click="lookOverContent(row)" style="color: #5ca3e5;" class="vxe-icon-search"></i>
                                            <span style="padding-left: 8px;">{{row.ftype7}}</span>
                                        </div>
                                    </template>
                                    <template v-slot:name_fjcjl="{row}" data-desc="自定操作栏">
                                        <compSelector
                                            v-if="!flowPathParameter.isHidden"
                                            :key="selectItem"
                                            :compName="'name'+row.id"
                                            :width="105"
                                            v-model="row.fjcjl"
                                            :compType="typeSelect"
                                            :defaultValue="row.fjcjl"
                                            :options="{
                                                data:optionsData,
                                                dataType:{
                                                    label:'itemText',
                                                    value:'itemValue',
                                                }
                                            }"
                                            @selectHandleChange="selectHandleChange($event,row)"
                                        />
                                        <span v-else>{{ row.fjcjl }}</span>
                                    </template>
                                    <template v-slot:name_fscjl="{row}" data-desc="自定操作栏">
                                        <div
                                         @click="reviewRecordsClick(row,flowPathParameter.isHidden)" 
                                         style="width: 100%; height: 48px; display: flex; align-items: center;" 
                                         v-if="reviewRecordsId !== row.id || !reviewRecordsId"
                                        >
                                            <span>{{ row.fscjl }}</span>
                                        </div>
                                        <vxe-textarea
                                            class="review-records-box"
                                            ref="userNameInput"
                                            v-if="reviewRecordsId && reviewRecordsId == row.id"
                                            @focus="reviewRecordsFocusEvent"
                                            @blur="reviewRecordsBlurEvent(row)"
                                            placeholder="请输入审查记录"
                                            v-model:value="row.fscjl"
                                            :autosize="{ minRows: 2, maxRows: 30 }">
                                        </vxe-textarea>
                                        <!-- <a-input
                                            ref="userNameInput"
                                            v-if="reviewRecordsId && reviewRecordsId == row.id"
                                            @focus="reviewRecordsFocusEvent"
                                            @blur="reviewRecordsBlurEvent(row)"
                                            placeholder="请输入审查记录"
                                            v-model:value="row.fscjl"
                                        /> -->
                                    </template>
                                    
                                </commpVxeTable>
                            </div>
                        </a-col>
                    </a-row>
                </div>
            </a-tab-pane>
            <a-tab-pane key="审评报告" tab="审评报告">
                <a-collapse v-model:activeKey="collapseActiveKeyArr" class="tabs-collapse-box">
                    <a-collapse-panel :key="flowPathParameter.reportInformation" header="报告信息">
                        <a-form
                        ref="form"
                        layout="inline" 
                        :form="inspectionReportForm" 
                        class="label-box-w"
                        >
                            <a-form-item label="审评范围" class="segment-long-box" >
                                <!-- <a-input placeholder="请输入审评范围" v-model:value="formField.fcyjcfw"/> -->
                                <a-textarea
                                    style="width: 100%!important;"
                                    v-if="!flowPathParameter.isHidden"
                                    placeholder="请输入审评范围" 
                                    :rows="4" 
                                    v-model:value="formField.fcyjcfw"
                                />
                                <span v-else>{{ formField.fcyjcfw }}</span>
                                <!-- @click="ideaClick('审评范围','fcyjcfw')"  -->
                            </a-form-item>
                            <br/>

                            <a-form-item label="审评依据" class="segment-long-box" >
                                <!-- <a-input placeholder="请输入审评依据" v-model:value="formField.fcyjcyj"/> -->
                                <a-textarea
                                    style="width: 100%!important;"
                                    v-if="!flowPathParameter.isHidden"
                                    placeholder="请输入审评依据" 
                                    :rows="4" 
                                    v-model:value="formField.fcyjcyj"
                                />
                                <span v-else>{{ formField.fcyjcyj }}</span>
                                <!-- @click="ideaClick('审评依据','fcyjcyj')"  -->
                            </a-form-item>
                            <br/>
                            <a-form-item label="陪同部门" class="accompany-form-item">
                                <a-input 
                                placeholder="请输入陪同部门" 
                                v-model:value="formField.fcyptbm" 
                                v-if="!flowPathParameter.isHidden"
                                @blur="accompanyDepBlur"
                                @focus="accompanyDepFocus"
                                />
                                <span v-else>{{ formField.fcyptbm }}</span>
                                <div class="select-accompany" v-if="isAccompanyDep">
                                    <div class="select-accompany-item" v-for="(item,index) in accompanyDep" @mousedown="accompanySelectClick(item.value,'fcyptbm')">
                                        <span>{{ item.value }}</span>
                                    </div>
                                </div>
                            </a-form-item>
                            <a-form-item label="陪同人员">
                                <a-input placeholder="请输入陪同人员" v-model:value="formField.fcyptry" v-if="!flowPathParameter.isHidden"/>
                                <span v-else>{{ formField.fcyptry }}</span>
                            </a-form-item>
                            <a-form-item label="陪同人员职务">
                                <a-input placeholder="请输入陪同人员职务" v-model:value="formField.fcyptryzw" v-if="!flowPathParameter.isHidden"/>
                                <span v-else>{{ formField.fcyptryzw }}</span>
                            </a-form-item>
                            <a-form-item label="审评的情况专述" class="segment-long-box" >
                                <!-- <a-input placeholder="请输入审评依据" v-model:value="formField.fcyjcyj"/> -->
                                <vxe-textarea
                                    style="width: 100% !important;"
                                    v-if="!flowPathParameter.isHidden"
                                    placeholder="请输入审评的情况专述" 
                                    v-model:value="formField.fjcqkzs"
                                    :autosize="{ minRows: 1, maxRows: 100 }" 
                                >
                                </vxe-textarea>
                                <a-button v-if="!flowPathParameter.isHidden" style="margin-left: 15px;" class="blue-btn" type="primary" @click="getBasicField('审评的情况专述','fjcqkzs')">获取审评的情况专述</a-button>
                                <span v-else>{{ formField.fjcqkzs }}</span>
                                <!-- @click="ideaClick('审评依据','fcyjcyj')"  -->
                            </a-form-item>
                            <br/>
                            <a-form-item label="栏目类型" class="segment-long-box" >
                                <a-checkbox-group v-model="formField.fxzdldlm" :options="basicData" @change="onBasicChange" />
                                <a-button style="margin-left: 15px;" class="blue-btn" type="primary" @click="segmentSubmitClick(1)">保存</a-button>
                            </a-form-item>
                            <br/>
                            <div style="margin-top: 15px;"></div>
                            <!-- 六大栏 -->
                            <a-collapse v-model:activeKey="basicActiveKeyArr" class="tabs-collapse-box" :key="basicCollapse">
                                <a-collapse-panel v-for="(item,index) in basicData" :key="index+1+''" :header="item.label+'栏'" class="collapse-panel-head-l380" v-if="item.isDisabled">
                                    <a-form layout="inline" v-if="!flowPathParameter.isHidden">
                                        <a-form-item v-if="!flowPathParameter.isHidden">
                                            <a-upload style="display: inline-block;" :beforeUpload="segmentBeforeUpload" :showUploadList="false" action="" @change="enterpriseUpload($event,item.label)">
                                                <a-button class="blue-btn" type="primary">上传</a-button>
                                            </a-upload>
                                        </a-form-item>
                                        <a-form-item v-if="!flowPathParameter.isHidden">
                                            <a-button v-if="!flowPathParameter.isHidden" style="margin-left: 15px;" class="blue-btn" type="primary" @click="getBasicField(item.label,item.key)">获取{{ item.label }}</a-button>
                                        </a-form-item>
                                        <a-form-item v-if="!flowPathParameter.isHidden">
                                            <a-button v-if="!flowPathParameter.isHidden" style="margin-left: 15px;" class="blue-btn" type="primary" @click="segmentSubmitClick(1)">保存</a-button>
                                        </a-form-item>
                                    </a-form>
                                    <a-form-item class="basic-long-box" >
                                        <div style="display: flex;">
                                            <a-textarea style="width: 100% !important;" :placeholder="'请输入'+item.label" :autosize="{ minRows: 3, maxRows: 10000 }" v-if="!flowPathParameter.isHidden && item.key == 'fcfyss'" v-model:value="formField[item.key]"/>
                                            <a-textarea style="width: 100% !important;" :placeholder="'请输入'+item.label" :autosize="{ minRows: 3, maxRows: 10000 }" v-else-if="!flowPathParameter.isHidden && item.value !== 'fcfyss'" v-model:value="formField[item.key]"/>
                                            <span v-else>{{ formField[item.key] }}</span>
                                            <div>
                                                <a-button v-if="!flowPathParameter.isHidden && item.label=='厂房与设施'" style="margin-left: 15px;" class="blue-btn" type="primary" @click="getEntries(item.label,item.key)">获取词条</a-button>
                                            </div>
                                        </div>
                                    </a-form-item>
                                    
                                    <commpVxeTable
                                        :key="basicRefresh"
                                        :config="basicConfigList[item.key+'Config']" 
                                        :columns="basicColumnsList"
                                        :formItem="[]" 
                                        :adaptiveHeight="true"
                                    > 
                                        <template v-slot:fwjccmc_slots="{row}" data-desc="自定操作栏">
                                            <span>{{ row.fwjxsmc }}{{ row.fwjlx }}</span>
                                        </template>
                                        <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                            <a-form layout="inline" class="search-form" >
                                                <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                                    <a-button class="red-btn " type="primary" @click="deleteClick(row,'basicRefresh')" >删除</a-button>
                                                </a-form-item>
                                                <a-form-item class="vxe-table-box-w">
                                                    <a-button class="blue-btn" type="primary" @click="downloadClick(row,'basicRefresh')" >下载</a-button>
                                                </a-form-item>
                                            </a-form>
                                        </template>
                                    </commpVxeTable>
                                </a-collapse-panel>
                            </a-collapse>
                            
                            <a-form-item label="" class="segment-long-box btn-only" v-if="!flowPathParameter.isHidden">
                                <!-- <a-button class="blue-btn" type="primary" @click="acquireDefectsClick()">获取缺陷项</a-button> -->
                                <a-button v-if="!flowPathParameter.isHidden" style="margin-bottom: 15px;" class="blue-btn" type="primary" @click="getConclusion(['fcyyzqx','fcyzyqx','fcyybqx','fcyjl'])">获取缺陷项和审查结论</a-button>
                            </a-form-item>
                            <a-form-item label="严重缺陷" class="segment-long-box" >
                                <a-input style="width: 100% !important;" placeholder="请输入严重缺陷" v-if="!flowPathParameter.isHidden" v-model:value="formField.fcyyzqx"/>
                                <span v-else>{{ formField.fcyyzqx }}</span>
                            </a-form-item>
                            <br/>
                            <!-- <a-form-item label="主要缺陷" class="segment-long-box" >
                                <a-input style="width: 100% !important;" placeholder="请输入主要缺陷" v-if="!flowPathParameter.isHidden" v-model:value="formField.fcyzyqx"/>
                                <span v-else>{{ formField.fcyzyqx }}</span>
                            </a-form-item>
                            <br/> -->
                            <a-form-item label="一般缺陷" class="segment-long-box" >
                                <a-input style="width: 100% !important;" placeholder="请输入一般缺陷" v-if="!flowPathParameter.isHidden" v-model:value="formField.fcyybqx"/>
                                <span v-else>{{ formField.fcyybqx }}</span>
                            </a-form-item>
                            <br/>
                            <a-form-item label="需要说明的其他问题" class="segment-long-box" >
                                <a-input style="width: 100% !important;" placeholder="请输入需要说明的其他问题" v-if="!flowPathParameter.isHidden" v-model:value="formField.fcyqtwt"/>
                                <span v-else>{{ formField.fcyqtwt }}</span>
                            </a-form-item>
                            <a-form-item label="审查结论" class="segment-long-box" >
                                <!-- <a-input placeholder="请输入审查结果" v-model:value="formField.fcyjg"/> -->
                                <a-textarea 
                                    style="width: 100% !important;"
                                    v-if="!flowPathParameter.isHidden"
                                    placeholder="请输入审查结论" 
                                    :rows="8" 
                                    v-model:value="formField.fcyjl"
                                />
                                <span v-else>{{ formField.fcyjl }}</span>
                                <!-- @click="ideaClick('审查结果','fcyjg')"  -->
                            </a-form-item>
                            <br/>
                            <a-form-item label="审查结果" class="segment-long-box" >
                                <!-- <a-input placeholder="请输入审查结果" v-model:value="formField.fcyjg"/> -->
                                <compSelector
                                v-if="!flowPathParameter.isHidden"
                                v-model="formField.fcyjg"
                                :compType="typeSelect"
                                :defaultValue="formField.fcyjg"
                                dictionaryType="医疗器械技术审评审查结果"
                                />
                                <span v-else>{{ formField.fcyjg }}</span>
                                <!-- @click="ideaClick('审查结果','fcyjg')"  -->
                            </a-form-item>
                            <a-form-item >
                                <a-button style="margin-left: 140px;" class="blue-btn" type="primary" @click="segmentSubmitClick(1)">保存</a-button>
                            </a-form-item>
                        </a-form>
                    </a-collapse-panel>
                    <a-collapse-panel key="9" header="报告记录">
                        <!-- <template #extra>
                            <span v-if="collapseActiveKeyArr.indexOf('9') !== -1" 
                            @click="collapseActiveKeyArr = collapseActiveKeyArr.filter(item => item !== '9')">折叠</span>
                            <span v-else @click="collapseActiveKeyArr.push('9')">展开</span>
                        </template>-->
                        <a-form layout="inline" style="margin-bottom:10px" v-if="!flowPathParameter.isHidden">
                            <a-form-item >
                                <a-button class="blue-btn" type="primary" @click="generateRecord('技术审评报告','报告生成')">生成记录</a-button>
                            </a-form-item>
                            <a-form-item >
                                <a-button class="blue-btn" type="primary" @click="generateRecord('报告真实性核查表','报告生成')">生成报告真实性核查记录</a-button>
                            </a-form-item>
                        </a-form>
                        <commpVxeTable
                            :key="inspectionReportRefresh"
                            :config="inspectionReportConfig" 
                            :columns="inspectionReportColumns"
                            :formItem="[]" 
                            :adaptiveHeight="true"
                        > 
                            <template v-slot:fwjccmc_slots="{row}" data-desc="自定操作栏">
                                <span>{{ row.fwjxsmc }}{{ row.fwjlx }}</span>
                            </template>
                            <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                <a-form layout="inline" class="search-form" >
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="viewClick(row)" >查看</a-button>
                                    </a-form-item>
                                    <a-form-item>
                                        <a-button class="blue-btn dMould-btn" type="primary" @click="producerMould(row,'技术审评报告','报告生成')" >选择模板</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="editMode == '服务端模式'">
                                        <!-- 服务端编辑 -->
                                        <a-button class="blue-btn" type="primary" @click="serverEdit(row)" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="row.fwjlx !== '.pdf' && editMode == '客户端模式'">
                                        <a-button class="blue-btn" type="primary" @click="editClick(row,'报告生成')" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item  v-if="row.fwjlx == '.pdf' && editMode == '客户端模式'">
                                            <a-button class="blue-btn dMould-btn" type="primary" @click="againEdit(row,'报告生成')" >重新编辑</a-button>
                                    </a-form-item>
                                    
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-button class="red-btn " type="primary" @click="deleteClick(row,'报告生成')" >删除</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-upload style="display: inline-block;" :beforeUpload="segmentBeforeUpload" action="" @change="uploadClick($event,row,'报告生成')">
                                            <a-button class="blue-btn" type="primary">上传</a-button>
                                        </a-upload>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="downloadClick(row,'报告生成')" >下载</a-button>
                                    </a-form-item>
                                </a-form>
                            </template>
                        </commpVxeTable>
                        <div style="margin-top: 20px;"></div>
                        <commpVxeTable
                            :key="inspectionReportRefresh"
                            :config="defectConfig" 
                            :columns="defectColumns"
                            :formItem="[]" 
                            :adaptiveHeight="true"
                        > 
                            <template v-slot:fwjccmc_slots="{row}" data-desc="自定操作栏">
                                <span>{{ row.fwjxsmc }}{{ row.fwjlx }}</span>
                            </template>
                            <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                <a-form layout="inline" class="search-form" >
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="viewClick(row)" >查看</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="editMode == '服务端模式'">
                                        <!-- 服务端编辑 -->
                                        <a-button class="blue-btn" type="primary" @click="serverEdit(row)" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="row.fwjlx !== '.pdf' && editMode == '客户端模式'">
                                        <a-button class="blue-btn" type="primary" @click="editClick(row,'报告生成')" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item  v-if="row.fwjlx == '.pdf' && editMode == '客户端模式'">
                                            <a-button class="blue-btn dMould-btn" type="primary" @click="againEdit(row,'报告生成')" >重新编辑</a-button>
                                    </a-form-item>
                                    <!-- <a-form-item >
                                        <a-button class="blue-btn dMould-btn" type="primary" @click="producerMould(row,'缺陷报告','报告生成')" >选择模板</a-button>
                                    </a-form-item> -->
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-button class="red-btn " type="primary" @click="deleteClick(row,'报告生成')" >删除</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-upload style="display: inline-block;" :beforeUpload="segmentBeforeUpload" action="" @change="uploadClick($event,row,'报告生成')">
                                            <a-button class="blue-btn" type="primary">上传</a-button>
                                        </a-upload>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="downloadClick(row,'报告生成')" >下载</a-button>
                                    </a-form-item>
                                </a-form>
                            </template>
                        </commpVxeTable>
                        <div style="margin-top: 20px;"></div>
                        <commpVxeTable
                            :key="inspectionReportRefresh"
                            :config="authenticityConfig" 
                            :columns="authenticityColumns"
                            :formItem="[]" 
                            :adaptiveHeight="true"
                        > 
                            <template v-slot:fwjccmc_slots="{row}" data-desc="自定操作栏">
                                <span>{{ row.fwjxsmc }}{{ row.fwjlx }}</span>
                            </template>
                            <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                <a-form layout="inline" class="search-form" >
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="viewClick(row)" >查看</a-button>
                                    </a-form-item>
                                    <a-form-item >
                                        <a-button class="blue-btn dMould-btn" type="primary" @click="producerMould(row,'报告真实性核查表','报告生成')" >选择模板</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="editMode == '服务端模式'">
                                        <!-- 服务端编辑 -->
                                        <a-button class="blue-btn" type="primary" @click="serverEdit(row)" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="row.fwjlx !== '.pdf' && editMode == '客户端模式'">
                                        <a-button class="blue-btn" type="primary" @click="editClick(row,'报告生成')" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item  v-if="row.fwjlx == '.pdf' && editMode == '客户端模式'">
                                            <a-button class="blue-btn dMould-btn" type="primary" @click="againEdit(row,'报告生成')" >重新编辑</a-button>
                                    </a-form-item>
                                    
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-button class="red-btn " type="primary" @click="deleteClick(row,'报告生成')" >删除</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="!flowPathParameter.isHidden">
                                        <a-upload style="display: inline-block;" :beforeUpload="segmentBeforeUpload" action="" @change="uploadClick($event,row,'报告生成')">
                                            <a-button class="blue-btn" type="primary">上传</a-button>
                                        </a-upload>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="downloadClick(row,'报告生成')" >下载</a-button>
                                    </a-form-item>
                                </a-form>
                            </template>
                        </commpVxeTable>
                    </a-collapse-panel>
                    <a-collapse-panel key="11" header="技术审评缺陷项目记录表" v-if="flowPathParameter.isDefectList">
                        <!-- <template #extra>
                            <span v-if="collapseActiveKeyArr.indexOf('11') !== -1" 
                            @click="collapseActiveKeyArr = collapseActiveKeyArr.filter(item => item !== '11')">折叠</span>
                            <span v-else @click="collapseActiveKeyArr.push('11')">展开</span>
                        </template>-->
                        <a-form layout="inline" style="margin-bottom:10px" >
                            <a-form-item >
                                <a-button class="blue-btn" type="primary" @click="generateRecord('技术审评缺陷项目记录表','技术审评缺陷项目记录表')">生成记录</a-button>
                            </a-form-item>
                        </a-form>
                        <commpVxeTable
                            :key="onSiteProjectsRefresh"
                            :config="onSiteProjectsConfig" 
                            :columns="onSiteProjectsColumns"
                            :formItem="[]" 
                            :adaptiveHeight="true"
                        > 
                            <template v-slot:fwjccmc_slots="{row}" data-desc="自定操作栏">
                                <span>{{ row.fwjxsmc }}{{ row.fwjlx }}</span>
                            </template>
                            <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                <a-form layout="inline" class="search-form" >
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="viewClick(row)" >查看</a-button>
                                    </a-form-item>
                                    <a-form-item >
                                        <a-button class="blue-btn dMould-btn" type="primary" @click="producerMould(row,'技术审评缺陷项目记录表','技术审评缺陷项目记录表')" >选择模板</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="editMode == '服务端模式'">
                                        <!-- 服务端编辑 -->
                                        <a-button class="blue-btn" type="primary" @click="serverEdit(row)" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" v-if="row.fwjlx !== '.pdf'">
                                        <a-button class="blue-btn" type="primary" @click="editClick(row,'技术审评缺陷项目记录表')" >编辑</a-button>
                                    </a-form-item>
                                    <a-form-item v-if="row.fwjlx == '.pdf'">
                                        <a-button class="blue-btn dMould-btn" type="primary" @click="againEdit(row,'技术审评缺陷项目记录表')" >重新编辑</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" >
                                        <a-button class="red-btn" type="primary" @click="deleteClick(row,'技术审评缺陷项目记录表')" >删除</a-button>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w" >
                                        <a-upload style="display: inline-block;" :beforeUpload="segmentBeforeUpload" action="" @change="uploadClick($event,row,'技术审评缺陷项目记录表')">
                                            <a-button class="blue-btn" type="primary">上传</a-button>
                                        </a-upload>
                                    </a-form-item>
                                    <a-form-item class="vxe-table-box-w">
                                        <a-button class="blue-btn" type="primary" @click="downloadClick(row)" >下载</a-button>
                                    </a-form-item>
                                </a-form>
                            </template>
                        </commpVxeTable>
                    </a-collapse-panel>
                    <a-collapse-panel key="12" header="主办人意见" v-if="flowPathParameter.isHidden">
                        <!-- <template #extra>
                            <span v-if="collapseActiveKeyArr.indexOf('12') !== -1" 
                            @click="collapseActiveKeyArr = collapseActiveKeyArr.filter(item => item !== '12')">折叠</span>
                            <span v-else @click="collapseActiveKeyArr.push('12')">展开</span>
                        </template>-->
                        <a-form
                        ref="form"
                        layout="inline" 
                        :form="inspectionReportForm" 
                        class="label-box-w"
                        >
                            <a-form-item label="主办人意见结果" class="segment-long-box" >
                                <!-- <a-input placeholder="请输入审查结果" v-model:value="formField.fcyjg"/> -->
                                <compSelector
                                v-if="!formField.isZjOpinion"
                                v-model="formField.fspzxyjjg"
                                :compType="typeSelect"
                                :defaultValue="formField.fspzxyjjg"
                                :options="[{label:'同意',value:'同意'},{label:'不同意',value:'不同意'}]"
                                />
                                <span v-else>{{ formField.fspzxyjjg }}</span>
                            </a-form-item>
                            <br/>
                            <a-form-item label="主办人意见" class="segment-long-box" >
                                <!-- <a-input placeholder="请输入审查结果" v-model:value="formField.fcyjg"/> -->
                                <a-textarea
                                    v-if="!formField.isZjOpinion"
                                    @focus="ideaFocusEvent" 
                                    @blur="ideaBlur"
                                    @click="ideaClick('主办人意见','fspzxyj')"
                                    style="width: 100%!important;"
                                    placeholder="请输入主办人意见" 
                                    :rows="4" 
                                    v-model:value="formField.fspzxyj"
                                />
                                <span v-else>{{ formField.fspzxyj }}</span>
                            </a-form-item>
                            <a-form-item v-if="!formField.isZjOpinion">
                                <a-button style="margin-left: 140px;" class="blue-btn" type="primary" @click="segmentSubmitClick('审评中心意见')">保存</a-button>
                            </a-form-item>
                        </a-form>
                    </a-collapse-panel>
                </a-collapse>
                <!-- <a-form 
                    v-if="!flowPathParameter.isHidden"
                    style="margin-top: 20px;"
                    ref="form"
                    layout="inline" 
                    :form="inspectionReportForm" >
                    <a-form-item label="下个环节">
                        <span style="padding-right: 30px;">{{formField.nextNode}}</span>短信通知<a-checkbox style="margin-left: 10px;" v-model:checked="formField.smgflag"></a-checkbox>
                    </a-form-item>
                </a-form>
                <a-form layout="inline" style="display: flex;justify-content: center;padding-top: 20px;" v-if="!flowPathParameter.isHidden">
                    <a-form-item >
                        <a-button class="blue-btn" type="primary" @click="segmentSubmitClick(1)">保存</a-button>
                    </a-form-item>
                    <a-form-item >
                        <a-button class="blue-btn" type="primary" @click="segmentSubmitClick(2)" >提交</a-button>
                    </a-form-item>
                </a-form> -->
            </a-tab-pane>
        </a-tabs>
        <a-modal
            :title="ideaType"
            v-model:visible="ideaVisible"
            @ok="ideaHandleOk"
            class="idea-modal-box"
            @cancel="ideaVisible = false"
        >
            <a-form layout="inline">
                <a-form-item :label="ideaType" class="pull-input-w">
                    <div style="display: flex;align-items: center;">
                        <vxe-textarea
                         rows="3" 
                         @focus="recordCommentsFocus" 
                         @blur="recordCommentsBlur" 
                         @change="recordCommentsChange"  
                         v-model="opinionsText" 
                         :placeholder="'请输入或选择'+ideaType"
                         suffix-icon="vxe-icon-search"></vxe-textarea>
                        <a-button style="margin-left: 15px;" class="blue-btn"  type="primary" @click.stop="saveComments" >保存</a-button>
                    </div>
                    <!-- <vxe-input
                     @focus="recordCommentsFocus" 
                     @blur="recordCommentsBlur" 
                     @change="recordCommentsChange"  
                     v-model:value="opinionsText" 
                     :placeholder="'请输入或选择'+ideaType" 
                     suffix-icon="vxe-icon-search"></vxe-input> -->
                    <div class="opinion-record-box" v-show="isRecordComments">
                        <div v-if="segOpinionsList.length" class="content-box">
                            <div v-for="(item,index) in segOpinionsList" class="content-for">
                                <div @click.stop="selectIdea(item)"  class="content-item">
                                    <span class="content-text" v-if="ideaType=='办理意见'" >{{ item.fcontent}}</span>
                                    <span class="content-text" v-else >{{ item.fzdnr}}</span>
                                    <!-- item.fzdnr -->
                                    <a-button class="red-btn" size="small" type="primary" @click.stop="deleteIdea(item)" >删除</a-button>
                                </div>
                            </div>
                        </div>
                        <div class="no-data-box" v-else>暂无记录！</div>
                    </div>
                </a-form-item>
            </a-form>
        </a-modal>
        <a-modal
            title="查看"
            :visible="fcontentVisible"
            @ok="fcontentVisible = false"
            @cancel="fcontentVisible = false"
        >
            <p>
                <span style="font-weight: 600;">类型3：</span>
                <span>{{ fcontent1.ftype3 }}</span>
            </p>
            <p>
                <span style="font-weight: 600;">项目类型：</span>
                <span>{{ fcontent1.ftype4 }}</span>
            </p>
            <p>
                <span style="font-weight: 600;">章节：</span>
                <span>{{ fcontent1.ftype5 }}</span>
            </p>
            <p>
                <span style="font-weight: 600;">条款：</span>
                <span>{{ fcontent1.ftype6 }}</span>
            </p>
            <p>
                <span style="font-weight: 600;">条款号：</span>
                <span>{{ fcontent1.ftype7 }}</span>
            </p>
            <p>
                <span style="font-weight: 600;">附录条款：</span>
                <span>{{ fcontent1.ftype8 }}</span>
            </p>
            <p>
                <span style="font-weight: 600;">规范内容：</span>
                <span>{{ fcontent1.fcontent1 }}</span>
            </p>
            <p>
                <span style="font-weight: 600;">指导原则内容：</span>
                <span>{{ fcontent1.fcontent2 }}</span>
            </p>
            <p>
                <span style="font-weight: 600;">附录内容：</span>
                <span>{{ fcontent1.fcontent3 }}</span>
            </p>
        </a-modal>

        <a-modal
            title="查看"
            width="1000px"
            :visible="pdfVisible"
            @ok="pdfVisible = false"
            @cancel="pdfVisible = false"
            @afterClose="pdfAfterClose"
        >
            <div style="width: 100%;height: 420px;overflow: auto;">
                <pdf :src="iframeSrc" ref="myPdfComponent"></pdf>
            </div>
        </a-modal>
        <a-modal
            title="厂房与设施词条"
            width="1000px"
            :visible="entriesVisible"
            @ok="entriesOk"
            @cancel="entriesVisible = false"
        >
            <a-select
            v-model:value="entriesSelectList"
            :options="entriesList"
            mode="multiple"
            placeholder="请选择"
            style="width: 200px"
            />
        </a-modal>
        <a-modal
            :width="1000"
            title="选择模板"
            :visible="selectTemplateVisible"
            @ok="selectTemplateHandleOk"
            @cancel="selectTemplateVisible = false"
            :forceRender="true"
        >
            <commpVxeTable
                :key="selectTemplateKey"
                :config="selectTemplateConfig" 
                :columns="selectTemplatecolumnsVxe" 
                :formItem="selectTemplateformItem"
                @radioChange="selectTemplateChange"
                ref="acceptanceRegistrationRef"
            >
            </commpVxeTable>
        </a-modal>
        <serverEditing ref="serverEditingRef" @refreshChange="refreshFunction(1)"/>
        <serverEditingView ref="serverEditingViewRef" @refreshChange="$event=>{}"/>
        <selectTemplate ref="selectTemplateRef" @selectTemplateComplete="selectTemplateComplete"/>
    </div>
</template>
<script>
import selectTemplate from '@/components/selectTemplate/selectTemplate.vue'
import serverEditingView from '@/components/comp-model-series/server-editing-view'
import serverEditing from '@/components/comp-model-series/server-editing.vue'
import commpVxeTable from '@/components/commp-vxe-table/commp-vxe-table.vue'
import assessCheckApi from './service/api'
import compSelector from '@/components/compSelector/compSelector.vue'
import pdf from 'vue-pdf'
import CMapReaderFactory from 'vue-pdf/src/CMapReaderFactory.js'
import { 
    getLocalFileByIdServe,
    deletemodelByIdServe, 
    getFileTypeServe, 
    initWjjlServe, 
    queryListYwflServe, 
    spcyRsYwzdxxAddServe,
    spcyRsYwzdxxDeleteServe,
    getDefectRecordMapServe,
    addBatchIdeaServe,
    handlingOpinionsListServe,
    addServe,
    editServe,
    queryJcxmTreeTypeServe,
    againSqsxJcxmBySqsxid,
    queryJcxmListServe,
    ocalityPostAction,
    updateSqsxJcxmServe,
    getLocalFileById,
    deleteBatchIdeaServe,
    uploadMoreTypeFileServe,
    uploadPdfFileById,
    deleteFileByIdServe,
    queryYwzdYwflContent,
    getComprehensiveConclusionsMap,
    againEditPdfFile,
    selectWjmbServe,
    getDictListByDictCodeServe,
 } from './service/index'
import blobType from '@/common/blobType'
import TokenStorageUtil from "../../../utils/TokenStorageUtil";
import {typeInput, typeNumber, typeSelect, typeCheckbox, typeRadio} from '@/components/compSearchCriteria/ContractType'
import YchConstant from "@/api/YchConstant";
export default {
    components:{
        serverEditing,
        commpVxeTable,
        compSelector,
        pdf,
        serverEditingView,
        selectTemplate,
        
    },
    props:{
        flowPathParameter:{
            type:[Array,Object],
            default: () => {},
            required:false
        },
        modalContentHeight:{
            type:Number,
            default:1000,
            required:false
        }
    },
    watch:{
        flowPathParameter:{
            handler (newval, oldVal) {
                if(newval){
                    //console.log('流程二参数',newval)
                    this.HandledByOptions = []
                    
                    //console.log('88888888888',newval.fxzdldlm)
                    this.formField = JSON.parse(JSON.stringify(newval))
                    this.formField.fcyqtwt = newval.fcyqtwt?newval.fcyqtwt:'无'
                     this.formField.nextNodeDbrList.forEach(item => {
                        item = {
                            value:item.dbrid,
                            label:item.dbr
                        }
                        let arr = this.HandledByOptions.filter(i=>i.value == item.dbrid)
                        if(!arr.length){
                            this.HandledByOptions.push(item)
                        }
                    });
                    this.formField.fxzdldlm = this.formField.fxzdldlm?this.formField.fxzdldlm.split(','):[]
                    if(this.formField.fxzdldlm.length){
                        this.basicData.forEach((item,index)=>{
                            if(this.formField.fxzdldlm.indexOf(item.value) !== -1){
                                this.basicData[index].isDisabled = true
                            }else{
                                this.basicData[index].isDisabled = false
                            }
                        })
                    }else{
                        this.basicData.forEach((item,index)=>{
                            this.basicData[index].isDisabled = true
                            this.formField.fxzdldlm.push(item.value)
                        })
                    }
                    
                    this.basicCollapse = Date.now()
                    this.$forceUpdate()
                    this.refreshFunction(1)
                }
            },
            immediate: true,
            deep: true
        },
    },
    data(){
        return{
            optionsData:[],
            takeNotesId:'',
            takeNotesType:'',
            templateId:'',
            selectTemplateVisible:false,
            selectTemplateKey:null,
            selectTemplateConfig:{
                api:assessCheckApi.queryYwflWjmbList,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                selectType:'radio',
                listData:'wjmbList',
                paramet:{
                    sqsxid:this.flowPathParameter.sqsxid
                }
            },
            selectTemplatecolumnsVxe:[{
                    type:'radio',
                    width:60,
                },{
                    title: '模板标题', //列头显示文字
                    field: 'fmbbt',
                    key: 'fmbbt',
                },{
                    title: '文件类型', //列头显示文字
                    field: 'fwjlx',
                    key: 'fwjlx',
                },{
                    title: '模板类型1', //列头显示文字
                    field: 'fmblx1',
                    key: 'fmblx1',
                }],
            selectTemplateformItem:[{
                    label: '模板标题',
                    model: 'fmbbt',
                }],
            isAccompanyDep:false,
            accompanyDep:[{value:'生产部',label:'生产部'},{value:'质量部',label:'质量部'},{value:'生产部、质量部',label:'生产部、质量部'}],
            entriesVisible:false,
            entriesList:[{
                value:'净化空调系统',
                label:'净化空调系统',
            },{
                value:'纯化水系统',
                label:'纯化水系统',
            },{
                value:'提取车间',
                label:'提取车间',
            },{
                value:'浓缩间',
                label:'浓缩间',
            },{
                value:'醇沉间',
                label:'醇沉间',
            },{
                value:'干燥包装间',
                label:'干燥包装间',
            },{
                value:'收膏间',
                label:'收膏间',
            },{
                value:'仓储区',
                label:'仓储区',
            },{
                value:'化验室',
                label:'化验室',
            }],
            entriesData:{title:'',key:''},
            entriesSelectList:[],
            selectItem:null,
            blobType:blobType,
            routeName:this.$route.name,
            typeSelect:typeSelect,
            formField:{},
            inspectionReportForm:this.$form.createForm(this, { name: 'inspectionReportFormName' }),
            rules:{
                opinion: [{
                    required: true,
                    message: '请输入办理意见',
                    trigger: 'blur',
                }],
                dbrid: [{
                    type:'array',
                    required: true,
                    message: '请选择办理人',
                    trigger: 'blur',
                }]
            },
            HandledByOptions:[],
            collapseActiveKeyArr:['1','2','3','4','5','6','7','8','9','10','11','12'],
            basicActiveKeyArr:['1','2','3','4','5','6','7','8','9','10','11','12'],
            tabsModeValue:'人员和文件信息',
            inspectorsRefresh:null,
            inspectorsConfig:{
                api:assessCheckApi.queryJobByJobId,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'cyxpjlList',
                paramet:{
                    jobid:this.flowPathParameter?this.flowPathParameter.jobid:''
                }
            },
            inspectorsColumns:[{
                title: '姓名', //列头显示文字
                field: 'fjcyxm',
            },{
                title: '工作单位', //列头显示文字
                field: 'fgzdw',
            },{
                title: '职称', //列头显示文字
                field: 'fzc',
            },{
                title: '职务', //列头显示文字
                field: 'fzw',
            },{
                title: '所属区域', //列头显示文字
                field: 'fssqy',
            },{
                title: '联系电话', //列头显示文字
                field: 'fjcylxdh',
            },{
                title: '邮箱', //列头显示文字
                field: 'fjcyyx',
            },{
                title: '类型', //列头显示文字
                field: 'fjcydj',
            }],
            //审评方案
            inspectionPlanRefresh:null,
            inspectionPlanConfig:{
                api:assessCheckApi.queryXcjcWjjl,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'jcfaList',
                paramet:{
                    sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                }
            },
            inspectionPlanColumns:[{
                title: '方案', //列头显示文字
                field: 'fwjccmc',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fwjccmc_slots',
                },
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                width:750,
                fixed:'right'
            }],
            rectificationRefresh:null,
            rectificationConfig:{
                api:assessCheckApi.queryXcjcWjjl,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'jczgclyqList',
                paramet:{
                    sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                }
            },
            rectificationColumns:[{
                title: '整改材料名称', //列头显示文字
                field: 'fwjccmc',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fwjccmc_slots',
                },
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                width:750,
                fixed:'right'
            }],
            // 廉洁自律反馈表
            honestAutonomyRefresh:null,
            honestAutonomyConfig:{
                api:assessCheckApi.queryXcjcWjjl,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'ljzlfkbList',
                paramet:{
                    sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                }
            },
            honestAutonomyColumns:[{
                title: '廉洁自律反馈表', //列头显示文字
                field: 'fwjccmc',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fwjccmc_slots',
                },
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                width:750,
                fixed:'right'
            }],
            //客户满意度调查表
            customerSatisfactionRefresh:null,
            customerSatisfactionConfig:{
                api:assessCheckApi.queryXcjcWjjl,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'khmyddcbList',
                paramet:{
                    sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                }
            },
            customerSatisfactionColumns:[{
                title: '客户满意度调查表', //列头显示文字
                field: 'fwjccmc',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fwjccmc_slots',
                },
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                width:750,
                fixed:'right'
            }],
            //无利益冲突声明
            noConflictOfInterestRefresh:null,
            noConflictOfInterestConfig:{
                api:assessCheckApi.queryXcjcWjjl,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'wlyctsmList',
                paramet:{
                    sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                }
            },
            noConflictOfInterestColumns:[{
                title: '无利益冲突声明', //列头显示文字
                field: 'fwjccmc',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fwjccmc_slots',
                },
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                width:750,
                fixed:'right'
            }],
            //技术审评纪律
            inspectionDisciplineRefresh:null,
            inspectionDisciplineConfig:{
                api:assessCheckApi.queryXcjcWjjl,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'xcjcjlList',
                paramet:{
                    sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                }
            },
            inspectionDisciplineColumns:[{
                title: '技术审评纪律', //列头显示文字
                field: 'fwjccmc',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fwjccmc_slots',
                },
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                width:750,
                fixed:'right'
            }],
            //会议签到记录
            minutesOfTheMeetingRefresh:null,
            minutesOfTheMeetingConfig:{
                api:assessCheckApi.queryXcjcWjjl,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'hyqdbList',
                paramet:{
                    sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                }
            },
            minutesOfTheMeetingColumns:[{
                title: '会议签到记录', //列头显示文字
                field: 'fwjccmc',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fwjccmc_slots',
                },
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                width:750,
                fixed:'right'
            }],
            // 技术审评员承诺书
            letterOfCommitmentRefresh:null,
            letterOfCommitmentConfig:{
                api:assessCheckApi.queryXcjcWjjl,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'jcycnsList',
                paramet:{
                    sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                }
            },
            letterOfCommitmentColumns:[{
                title: '技术审评员承诺书', //列头显示文字
                field: 'fwjccmc',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fwjccmc_slots',
                },
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                width:750,
                fixed:'right'
            }],
            satisfactionRefresh:null,
            satisfactionConfig:{
                api:assessCheckApi.queryXcjcWjjl,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'ljzlhmyddcbList',
                paramet:{
                    sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                }
            },
            satisfactionColumns:[{
                title: '廉洁自律和满意度调查表', //列头显示文字
                field: 'fwjccmc',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fwjccmc_slots',
                },
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                width:750,
                fixed:'right'
            }],
            
            //报告生成
            inspectionReportRefresh:null,
            inspectionReportConfig:{
                api:assessCheckApi.queryXcjcWjjl,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'xcjcbgList',
                paramet:{
                    sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                }
            },
            inspectionReportColumns:[{
                title: '报告名称', //列头显示文字
                field: 'fwjccmc',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fwjccmc_slots',
                },
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                width:750,
                fixed:'right'
            }],
            //技术审评缺陷项目记录表
            onSiteProjectsRefresh:null,
            onSiteProjectsConfig:{
                api:assessCheckApi.queryInitQtWjjlList,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'xcjcqxxmjlbList',
                paramet:{
                    sqsxid:this.flowPathParameter.sqsxid
                }
            },
            onSiteProjectsColumns:[{
                title: '技术审评缺陷项目记录表', //列头显示文字
                field: 'fwjccmc',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fwjccmc_slots',
                },
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                width:750,
                fixed:'right'
            }], 
            defectConfig:{
                api:assessCheckApi.queryXcjcWjjl,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'xcjcqxjlbList',
                paramet:{
                    sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                }
            },
            defectColumns:[{
                title: '缺陷报告名称', //列头显示文字
                field: 'fwjccmc',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fwjccmc_slots',
                },
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                width:750,
                fixed:'right'
            }],
            authenticityConfig:{
                api:assessCheckApi.queryXcjcWjjl,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'bgzsxhcbList',
                paramet:{
                    sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                }
            },
            authenticityColumns:[{
                title: '报告真实性核查表', //列头显示文字
                field: 'fwjccmc',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fwjccmc_slots',
                },
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                width:750,
                fixed:'right'
            }],
            //弹窗选择
            ideaVisible:false,
            opinionsText:'',
            ideaType:'',
            segOpinionsList:[],
            isRecordComments:false,
            formFieldKey:'',
            compSelectorkey:null,

            //审查项目
            treeCheckedKeys:[],
            selectedKeys:[],
            treeData:[],
            reviewItemsFormItem:[{
                label: '条款',
                field: 'ftype6',
            },{
                label: '审查结论',
                model: 'fjcjl',
                separateAreas: 'jcxmqxzt'+blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                dictionaryType:'审评结论',
                type:typeSelect,
            },{
                label: '审查记录',
                model: 'fscjl',
            }],
            reviewItemsRefresh:null,
            reviewItemsConfig:{
                api: assessCheckApi.queryJcxmList,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:document.body.clientHeight - 220,
                pageSize:1000,
                paramet:{
                    type:'审评项目',
                    sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:'',
                    sfqx:this.flowPathParameter.sfqx?this.flowPathParameter.sfqx:'',
                }
            },
            reviewItemsColumns:[{
                    title: '序号', //列头显示文字
                    field: 'fxh',
                    width:50,
                },
                {
                    title: '章节', //列头显示文字
                    field: 'ftype5',
                    width:100,
                },
                {
                    title: '规范条款',
                    field: 'ftype6',
                    // slots: {
                    //     // 使用插槽模板渲染
                    //     default: 'name_ftype4',
                    // },
                    width:180,
                },{
                    title: '指导原则条款',
                    field: 'ftype7',
                    slots: {
                        // 使用插槽模板渲染
                        default: 'name_ftype7',
                    },
                    width:180,
                },{
                    title: '审查结论',
                    field: 'fjcjl',
                    slots: { default: 'name_fjcjl' },
                    titlePrefix:{icon:'vxe-icon-edit'},
                    width:120,
                },{
                    title: '审查记录（提示：光标移除自动保存，并有提示修改成功）',
                    field: 'fscjl',
                    slots: { default: 'name_fscjl' },
                    titlePrefix:{icon:'vxe-icon-edit'},
            }],
            reviewRecordsId:'',
            fscjlValue:'',
            fcontent1:{},
            fcontentVisible:false,
            iframeSrc:'',
            pdfVisible:false,

            basicData:[{
                label:'质量管理',
                value:'质量管理',
                key:'fzlgl',
                isDisabled:true,
            },{
                label:'机构与人员',
                value:'机构与人员',
                key:'fjgyry',
                isDisabled:true,
            },{
                label:'厂房与设施',
                value:'厂房与设施',
                key:'fcfyss',
                isDisabled:true,
            },{
                label:'设备',
                value:'设备',
                key:'fsb',
                isDisabled:true,
            },{
                label:'物料与产品',
                value:'物料与产品',
                key:'fwlycp',
                isDisabled:true,
            },{
                label:'确认与验证',
                value:'确认与验证',
                key:'fqryyz',
                isDisabled:true,
            },{
                label:'文件情况',
                value:'文件情况',
                key:'fwjqk',
                isDisabled:true,
            },{
                label:'生产管理',
                value:'生产管理',
                key:'fscgl',
                isDisabled:true,
            },{
                label:'质量控制与质量保证',
                value:'质量控制与质量保证',
                key:'fzlkzybz',
                isDisabled:true,
            },{
                label:'委托生产与委托检验',
                value:'委托生产与委托检验',
                key:'fwtscyjy',
                isDisabled:true,
            },{
                label:'产品发运与召回',
                value:'产品发运与召回',
                key:'fcpfyyzh',
                isDisabled:true,
            },{
                label:'自检',
                value:'自检',
                key:'fzj',
                isDisabled:true,
            }],
            basicCollapse:null,
            basicRefresh:null,
            basicConfigList:{
                fzlglConfig:{
                    api:assessCheckApi.querySixTypeFileList,
                    rowId: 'id',
                    fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                    height:400,
                    autoHidden:true,
                    pageSize:100,
                    listData:'zlglList',
                    paramet:{
                        sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                    }
                },
                fjgyryConfig:{
                    api:assessCheckApi.querySixTypeFileList,
                    rowId: 'id',
                    fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                    height:400,
                    autoHidden:true,
                    pageSize:100,
                    listData:'jgyryList',
                    paramet:{
                        sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                    }
                },
                fcfyssConfig:{
                    api:assessCheckApi.querySixTypeFileList,
                    rowId: 'id',
                    fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                    height:400,
                    autoHidden:true,
                    pageSize:100,
                    listData:'cfyssList',
                    paramet:{
                        sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                    }
                },
                fsbConfig:{
                    api:assessCheckApi.querySixTypeFileList,
                    rowId: 'id',
                    fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                    height:400,
                    autoHidden:true,
                    pageSize:100,
                    listData:'sbList',
                    paramet:{
                        sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                    }
                },
                fwlycpConfig:{
                    api:assessCheckApi.querySixTypeFileList,
                    rowId: 'id',
                    fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                    height:400,
                    autoHidden:true,
                    pageSize:100,
                    listData:'wlycpList',
                    paramet:{
                        sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                    }
                },
                fqryyzConfig:{
                    api:assessCheckApi.querySixTypeFileList,
                    rowId: 'id',
                    fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                    height:400,
                    autoHidden:true,
                    pageSize:100,
                    listData:'qryyzList',
                    paramet:{
                        sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                    }
                },
                fwjqkConfig:{
                    api:assessCheckApi.querySixTypeFileList,
                    rowId: 'id',
                    fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                    height:400,
                    autoHidden:true,
                    pageSize:100,
                    listData:'wjqkList',
                    paramet:{
                        sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                    }
                },
                fscglConfig:{
                    api:assessCheckApi.querySixTypeFileList,
                    rowId: 'id',
                    fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                    height:400,
                    autoHidden:true,
                    pageSize:100,
                    listData:'scglList',
                    paramet:{
                        sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                    }
                },
                fzlkzybzConfig:{
                    api:assessCheckApi.querySixTypeFileList,
                    rowId: 'id',
                    fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                    height:400,
                    autoHidden:true,
                    pageSize:100,
                    listData:'zlkzybzList',
                    paramet:{
                        sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                    }
                },
                fwtscyjyConfig:{
                    api:assessCheckApi.querySixTypeFileList,
                    rowId: 'id',
                    fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                    height:400,
                    autoHidden:true,
                    pageSize:100,
                    listData:'wtscyjyList',
                    paramet:{
                        sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                    }
                },
                fcpfyyzhConfig:{
                    api:assessCheckApi.querySixTypeFileList,
                    rowId: 'id',
                    fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                    height:400,
                    autoHidden:true,
                    pageSize:100,
                    listData:'cpfyyzhList',
                    paramet:{
                        sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                    }
                },
                fzjConfig:{
                    api:assessCheckApi.querySixTypeFileList,
                    rowId: 'id',
                    fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                    height:400,
                    autoHidden:true,
                    pageSize:100,
                    listData:'zjList',
                    paramet:{
                        sqsxid:this.flowPathParameter?this.flowPathParameter.sqsxid:''
                    }
                },
            },
            basicColumnsList:[{
                title: '文件名称', //列头显示文字
                field: 'fwjxsmc',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fwjccmc_slots',
                },
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                width:130,
                fixed:'right'
            }],
            fcyjgKey:null,
            

        }
    },
    computed: {
        editMode(){
            return this.$store.state.permission.editMode
        },
    },
    created(){
        this.getTreeData()//获取审查项目的树形
        getDictListByDictCodeServe({dictCode:'jcxmqxzt'+
        blobType.fywflcodeArr[blobType.menuType.indexOf(
            this.routeName.substring(this.routeName.indexOf('__'),
            this.routeName.indexOf('_a')+2))]}).then(res=>{
            //console.log('字典的res',res)
            if(res.code == 200){
                if(res.result.length){
                    this.optionsData = res.result
                }
                
            }
        })
    },
    updated(){
        this.$emit('updatedSuccess')
    },
    methods:{
        async dictionaryQuery(val){
            //console.log(val)
            let dataObj = []
            ocalityPostAction({dictName:val}).then(res=>{
                //console.log('字典的res',res)
                if(res.code == 200){
                    if(res.result.length){
                        dataObj = res.result
                        //console.log(dataObj)
                    }
                    
                }
            })
            
            //console.log('dataObj',dataObj)
            return dataObj
        },
        onBasicChange(val){
            this.basicData.forEach((item,index)=>{
                if(val.indexOf(item.value) !== -1){
                    this.basicData[index].isDisabled = true
                }else{
                    this.basicData[index].isDisabled = false
                }
            })
            this.basicCollapse = Date.now()
        },
        refreshFunction(name){
            //console.log(name)
            if(name === '审评方案' || name == 1){
                this.inspectionPlanRefresh = Date.now()
            }
            if(name === '廉洁自律反馈表' || name == 1){
                this.honestAutonomyRefresh = Date.now()
            }
            if(name === '客户满意度调查表' || name == 1){
                this.customerSatisfactionRefresh = Date.now()
            }
            if(name === '无利益冲突声明' || name == 1){
                this.noConflictOfInterestRefresh = Date.now()
            }
            if(name === '会议签到记录' || name == 1){
                this.minutesOfTheMeetingRefresh = Date.now()
            }
            if(name == '技术审评纪律' || name == 1){
                this.inspectionDisciplineRefresh = Date.now()
            }
            if(name == '技术审评员承诺书' || name == 1){
                //console.log(222,'技术审评员承诺书')
                this.letterOfCommitmentRefresh = Date.now()
            }
            if(name == '报告生成' || name == 1){
                //console.log(333,'报告生成')
                this.inspectionReportRefresh = Date.now()
            }
            if(name == '审评整改材料要求' || name == 1){
                this.rectificationRefresh = Date.now()
            }
            if(name == '技术审评缺陷项目记录表' || name == 1){
                this.onSiteProjectsRefresh = Date.now()
            }
            if(name == '廉洁自律和满意度调查表' || name == 1){
                this.satisfactionRefresh = Date.now()
            }
            
            if(name == 'basicRefresh'){
                this.basicRefresh = Date.now()
            }

        },
        segmentBeforeUpload(){ return false },
        viewClick(val){
            this.$refs.serverEditingViewRef.getData({id:val.id,fwjlx:val.fwjlx})
            this.$refs.serverEditingViewRef.serverEditingVisible = true
        },
        //查看
        lookOverClick(val){
            getFileTypeServe({id:val.id}).then(res=>{
                if(res.code == 200){
                    if(res.result == '.pdf'){
                        window.open(
                            bootConfig[process.env.NODE_ENV].locality_ApI+YchConstant.SPZX_SPCY+'/spcySqsxWjjl/getCrossLocalFile?id='+val.id
                        )
                    }else{
                        this.$message.warning('只能查看pdf文件')
                    }
                    
                }
                
            })
            
        },
        //下载
        downloadClick(val,name){
            var that = this
            var fileName = val.fwjccmc
            let param = { fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],id:val.id,sqsxid:this.formField.sqsxid}
            getFileTypeServe({id:val.id}).then(res=>{
                if(res.code == 200){
                    getLocalFileByIdServe(param).then((data) => {
                        if (!data) {
                            that.$message.warning('文件下载失败')
                        return
                        }
                        // if (typeof window.navigator.msSaveBlob !== 'undefined') {
                        //     window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }))
                        // } else {
                            let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf(val.fwjlx)] }))
                            let link = document.createElement('a')
                            link.style.display = 'none'
                            link.href = url
                            link.setAttribute('download', fileName + res.result)
                            document.body.appendChild(link)
                            link.click()
                            document.body.removeChild(link) //下载完成移除元素
                            window.URL.revokeObjectURL(url) //释放掉blob对象
                        // }
                    })
                }
                
            })
        },
        deleteClick(val,name){
            var that = this
            this.$confirm({
                title:'您确认要删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    deleteFileByIdServe({id:val.id}).then(res=>{
                        if(res.code == 200){
                            that.refreshFunction(name)
                            that.getHandlingOpinionsList(that.ideaType,that.opinionsText)
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
            
        },
        selectTemplateChange(val){
            this.templateId = val.row.id
        },
        producerMould(row,val){
            this.$refs.selectTemplateRef.getSelectTemplate(row,val,this.formField.sqsxid)
            this.$refs.selectTemplateRef.selectTemplateVisible = true
        },
        selectTemplateComplete(){
            this.refreshFunction(1)
        },
        //重新编辑
        againEdit(val,name){
            var that = this
            this.$confirm({
                title:'您确认删除已生成的pdf重新编辑文档吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    againEditPdfFile({id:val.id}).then(res=>{
                        if(res.code == 200){
                            that.$webOffice(
                                `api/spzx-spcy/spcyRsWjmb/openWjjl?id=${res.result.id}`,
                                `api/spzx-spcy/spcyRsWjmb/onLineSaveWjjl?id=${res.result.id}`+`-name=${val.fwjlx1+val.fwjlx}`,
                                `api/spzx-spcy/spcyRsWjmb/saveFileToPdf2?id=${res.result.id}`+`&sqsxid=${that.formField.sqsxid}`,
                                `api/spzx-spcy/spcyRsWjmb/saveFileGzToPdf2?id=${res.result.id}`+`&sqsxid=${that.formField.sqsxid}`,
                                `api/spzx-spcy/spcyRsWjmb/againEditOutPdfFile?id=${res.result.id}`,
                            )
                            that.refreshFunction(name)
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
        },
        //服务端编辑
        serverEdit(val){
            this.$refs.serverEditingRef.getData(val)
        },
        //在线编辑
        editClick(val,name){
            var that = this
            //console.log('在线编辑',val)
            if(val.fwjlx == '.pdf'){
                this.$message.warning('pdf文件无法编辑')
            }else{
                // window.localStorage.setItem('FieldPdf','0')
                // this.modelType = 2
                getFileTypeServe({id:val.id}).then(res=>{
                    if(res.code == 200){
                        if(res.result !== '.pdf'){
                            that.$webOffice(
                                `api/spzx-spcy/spcyRsWjmb/openWjjl?id=${val.id}`,
                                `api/spzx-spcy/spcyRsWjmb/onLineSaveWjjl?id=${val.id}`+`-name=${val.fwjlx1+val.fwjlx}`,
                                `api/spzx-spcy/spcyRsWjmb/saveFileToPdf2?id=${val.id}`+`&sqsxid=${this.formField.sqsxid}`,
                                `api/spzx-spcy/spcyRsWjmb/saveFileGzToPdf2?id=${val.id}`+`&sqsxid=${this.formField.sqsxid}`,
                                `api/spzx-spcy/spcyRsWjmb/againEditOutPdfFile?id=${val.id}`,
                            )
                        }else{
                            this.refreshFunction(name)
                            this.$message.warning('pdf文件无法编辑')
                        }
                        
                    }
                    
                })
                
            }
        },
        //上传
        uploadClick({file},val){//
            var that = this
            if(typeof file.uid !== 'undefined') {
                // if(file.name.indexOf(".xls") !== -1 || file.name.indexOf(".xlsx") !==-1) {
                    const fileData = new FormData();
                    fileData.append("file",file);
                    fileData.append("fywflcode",blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))]);
                    fileData.append("id",val.id);
                    fileData.append("sqsxid",this.formField.sqsxid);
                    
                    uploadPdfFileById(fileData).then(res => {
                        if(res.code !== 200){
                            that.$message.warning('请上传pdf文件或者联系管理员!')
                        }else{
                            this.manualSuccess()
                            that.$message.success('上传成功')
                        }
                    })
                // }
                
            }
        },
        enterpriseUpload({file},val){//
            var that = this
            if(typeof file.uid !== 'undefined') {
                // if(file.name.indexOf(".xls") !== -1 || file.name.indexOf(".xlsx") !==-1) {
                    const fileData = new FormData();
                    fileData.append("file",file);
                    fileData.append("sqsxid",this.formField.sqsxid);
                    fileData.append("fwjlx1",val);
                    
                    uploadMoreTypeFileServe(fileData).then(res => {
                        if(res.code){
                            if(res.code == 200){
                                that.$message.success(res.message)
                                that.basicRefresh = Date.now()
                            }else{
                                that.$message.warning(res.message)
                            }
                            
                        }
                        if(res.byteLength){
                            if(res.code && res.code !== 200){
                                that.$message.warning('请上传对应文件类型或者联系管理员!')
                            }else{
                                that.$message.success('上传成功')
                                that.basicRefresh = Date.now()
                            }
                        }
                    })
                // }
                
            }
        },
        //获取结论
        getConclusion(key){
            getComprehensiveConclusionsMap({sqsxid:this.formField.sqsxid}).then(res=>{
                if(res.code == 200){
                    key.forEach(item=>{
                        this.formField[item] = res.result[item]
                    })
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //陪同部门
        accompanySelectClick(val,key){
            this.formField[key] = val
            this.isAccompanyDep = false
        },
        accompanyDepBlur(){
            //console.log(2)
            this.isAccompanyDep = false
        },
        accompanyDepFocus(){
            this.isAccompanyDep = true
        },
        //获取质量管理等
        getBasicField(title,key){
            queryYwzdYwflContent({fzdlx1:title}).then(res=>{
                if(res.code == 200){
                    this.formField[key] = res.result.content?res.result.content:''
                    
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //获取词条
        getEntries(title,key){
            this.entriesVisible = true
            this.entriesData = {
                title:title,
                key:key
            }
            // this.entriesList
            // this.entriesSelectList
            this.entriesSelectList = []
            if(this.formField[key]){
                this.entriesList.forEach(item=>{
                    if(this.formField[key].indexOf(item.value) !== -1){
                        this.entriesSelectList.push(item.value)
                    }
                })
            }
            
        },
        entriesOk(){
            this.formField[this.entriesData.key] = '企业的'+this.entriesSelectList.join('、')+'等厂房设施，能满足品种生产要求。'
            this.entriesVisible = false
        },
        //生成记录
        generateRecord(val,name){
            //console.log(name)
            initWjjlServe({sqsxid:this.formField.sqsxid,type:val}).then(res=>{
                if(res.code == 200){
                    this.refreshFunction(name)
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        /* ------------审查项目----------- */
        matterTree(data,val) {
            //console.log('审评项目==========',data,val)
            var a = val+1
            for (var i = 0; i < data.length; i++) {
                // 这里面就是你处理数据的地方 
                // data[i].width = '200'
                if (data[i].children && data[i].children.length > 0) {
                // children若不为空数组，则继续 递归调用 本方法
                // data[i].children['name'+i] = data[i].title
                // //console.log('@@data[i].children',data[i].children)
                //建议用父级的key来做 
                let datas ={}
                datas['type'+a] = data[i].title
                datas['key'+a] = data[i].key
                let currentData = {...data[i],children:{}}
                data[i].children = data[i].children.map(item=> {return{...currentData,...item,...datas}})
                //console.log('这是得到的------',a,data[i].children)
                this.matterTree(data[i].children,a)
                }
            }
            return data
        },
        UpdateInspectionItems(){//更新审评项目
            againSqsxJcxmBySqsxid({sqsxid:this.formField.sqsxid}).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.getTreeData()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        getTreeData(){//获取树形
            queryJcxmTreeTypeServe({sqsxid:this.formField.sqsxid,type:'审评项目'}).then(res=>{

                if(res.code == 200){
                    this.treeData = this.matterTree(res.result,0)
                    let keyI = this.treeData[0].children && this.treeData[0].children.length?this.treeData[0].children[0].key:this.treeData[0].key
                    this.selectedKeys[0]= keyI
                    this.reviewItemsConfig.paramet = {...this.reviewItemsConfig.paramet,type1:this.treeData[0].title,type2:this.treeData[0].children && this.treeData[0].children.length?this.treeData[0].children[0].title:''}
                    this.reviewItemsRefresh = Date.now()
                    //console.log('改造后的树形',this.treeData)
                    
                }
            })
        },
        // getTreeTableData(val){//获取审查项目数据
        //     // reviewItemsRef
        //     let data = {
        //         sqsxid:this.formField.sqsxid,
        //         ...val

        //     }
        // },
        treeSelect(val,item){//选择树
            this.selectedKeys = val
            //console.log(val)
            //console.log(item)
            if(val.length && item.node && item.node._props && item.node._props.dataRef){
                let data = item.node._props.dataRef
                //console.log('获取到的的',data)
                // this.selectedKeys.push(val[0])
                // for (let key in data) {
                //     if(key.indexOf('key') !== -1 && key.length>3){
                //         this.selectedKeys.push(data[key])
                        
                //     }
                // }
                this.reviewItemsConfig.paramet = {
                    sqsxid:this.flowPathParameter.sqsxid,
                    type:'审评项目',
                    sfqx:this.flowPathParameter.sfqx?this.flowPathParameter.sfqx:'',
                    type1:data.type1 ?data.type1:data.title,
                    type2:data.type2 ?data.type2:(data.type1?data.title:''),
                    type3:data.type3 ?data.type3:(data.type2?data.title:''),
                    type4:data.type4 ?data.type4:(data.type3?data.title:''),
                    type5:data.type5 ?data.type5:(data.type4?data.title:''),
                    type6:data.type6 ?data.type6:(data.type5?data.title:''),
                    type7:data.type7 ?data.type7:(data.type6?data.title:''),
                    type8:data.type8 ?data.type8:(data.type7?data.title:''),
                    type9:data.type9 ?data.type9:(data.type8?data.title:''),
                }
                this.$refs.reviewItemsRef.searchEvent()
            }
            if(!val.length){
                this.reviewItemsConfig.paramet = {
                    sqsxid:this.flowPathParameter.sqsxid,
                    type:'审评项目',
                    sfqx:this.flowPathParameter.sfqx?this.flowPathParameter.sfqx:'',
                }
                this.$refs.reviewItemsRef.searchEvent()
            }
        },
        lookOverContent(val){
            //console.log(val)
            this.fcontent1 = {}
            this.fcontent1 = val
            this.fcontentVisible = true
        },
        //
        selectHandleChange(val,row){
            var that = this
            //console.log(val,row)
            updateSqsxJcxmServe({fjcjl:val,id:row.id}).then(res=>{
                if(res.code == 200){
                    this.$message.success('修改成功')
                }else{
                    this.$message.warning(res.message)
                    
                }
                this.$refs.reviewItemsRef.searchEvent()
            })
        },
        queryAll(){
            this.selectedKeys = []
            this.reviewItemsConfig.paramet = {sqsxid:this.flowPathParameter.sqsxid,sfqx:'yes',}
            this.reviewItemsRefresh = Date.now()
            
        },
        //表格渲染完成
        tableUpdated(){
            var that = this
            this.$nextTick(()=>{
                that.selectItem = Date.now()
            })
            
            //console.log('表格渲染完成')
        },
        reviewRecordsClick(val,isHidden){
            if(!isHidden){
                this.fscjlValue = val.fscjl
                this.reviewRecordsId = val.id
                this.$nextTick(() => {
                    this.$refs.userNameInput.focus()
                    this.reviewRecordsFocusEvent()
                })
            }
            
        },
        reviewRecordsFocusEvent(){

        },
        reviewRecordsBlurEvent(val){
            //console.log('当前得到了什么？',val)
            var that = this
            if(val.fscjl && (val.fscjl !== this.fscjlValue)){
                updateSqsxJcxmServe({fscjl:val.fscjl,id:val.id}).then(res=>{
                    if(res.code == 200){
                        this.$message.success('修改成功')
                        this.$refs.reviewItemsRef.searchEvent()
                        this.reviewRecordsId = ''
                    }else{
                        this.$message.warning(res.message)
                        that.$nextTick(() => {
                            that.$refs.userNameInput.focus()
                            that.reviewRecordsFocusEvent()
                        })
                    }
                })
            }else if(this.fscjlValue && !val.fscjl){
                this.$confirm({
                    title:'您确认要保存空的吗？',
                    // icon: createVNode(ExclamationCircleOutlined),
                    onOk() {
                        updateSqsxJcxmServe({fscjl:val.fscjl,id:val.id}).then(res=>{
                            if(res.code == 200){
                                that.$message.success('修改成功')
                                that.$refs.reviewItemsRef.searchEvent()
                                
                            }else{
                                that.$message.warning(res.message)
                                that.$nextTick(() => {
                                    that.$refs.userNameInput.focus()
                                    that.reviewRecordsFocusEvent()
                                })
                            }
                            that.reviewRecordsId = ''
                        })
                        that.reviewRecordsId = ''
                    },
                    onCancel(){
                        that.$refs.reviewItemsRef.searchEvent()
                        that.reviewRecordsId = ''
                    }
                    
                });
            }else{
                this.reviewRecordsId = ''
            }
        },
        
        /* ------------审查项目----------- */

        getHandlingOpinionsList(ideaType,val){//查询业务类型
            
            if(ideaType == '办理意见'){
                handlingOpinionsListServe({ftype1:ideaType,pageNo:1,pageSize:1000,fcontent:val}).then(res=>{
                    if(res.code == 200){
                        //console.log('办理意见',res)
                        this.segOpinionsList = res.result.records
                    }
                })

            }else{
                queryListYwflServe({ftype1:ideaType,fzdnr:val}).then(res=>{
                    if(res.code == 200){
                        //console.log('查询弹窗数据',res)
                        this.segOpinionsList = res.result
                    }
                })
            }
            
        },
        //弹窗输入框输入
        recordCommentsChange(){
            this.getHandlingOpinionsList(this.ideaType,this.opinionsText)
        },
        //选择弹窗选择
        selectIdea(val){
            this.opinionsText = this.ideaType == '办理意见'?val.fcontent:val.fzdnr
            this.isRecordComments = false
        },
        recordCommentsFocus(){
            this.isRecordComments = true
        },
        recordCommentsBlur(){},
        
        //删除意见
        deleteIdea(val,name){
            if(this.ideaType == '办理意见'){
                deleteBatchIdeaServe({ids:val.id}).then(res=>{
                    if(res.code == 200){
                        this.refreshFunction(name)
                        this.$message.success('删除成功')
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }else{
                spcyRsYwzdxxDeleteServe({id:val.id}).then(res=>{
                    if(res.code == 200){
                        this.refreshFunction(name)
                        this.$message.success('删除成功')
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }
            
        },
        ideaHandleOk(){
            this.ideaVisible = false
            // if(this.opinionsText !== this.formField[this.formFieldKey]){
                
                
                this.formField[this.formFieldKey] = this.opinionsText
                if(this.formFieldKey == 'opinion'){
                    this.inspectionReportForm.setFieldsValue({
                        opinion:this.opinionsText,
                    });
                }
                
            // }
            
            
            
        },
        saveComments(){
            this.ideaHandleOk()
            if(this.opinionsText){
                if(this.ideaType == '办理意见'){
                    addBatchIdeaServe({ftype1:this.ideaType,fcontent:this.opinionsText}).then(res=>{
                        this.getHandlingOpinionsList(this.ideaType,this.opinionsText)
                    })
                }else{
                    spcyRsYwzdxxAddServe({ftype1:this.ideaType,fzdnr:this.opinionsText}).then(res=>{
                        this.getHandlingOpinionsList(this.ideaType,this.opinionsText)
                    })
                }
            }
        },
        ideaFocusEvent(){
            // this.ideaBlur()
        },
        ideaBlur(){},
        //打开弹窗
        ideaClick(val,name){
            this.ideaVisible = true
            this.formFieldKey = name
            this.ideaType = val
            this.opinionsText = this.formField[name]
            this.getHandlingOpinionsList(val,this.formField[name])
        },
        acquireDefectsClick(){//获取缺陷项
            getDefectRecordMapServe({sqsxid:this.formField.sqsxid}).then(res=>{
                if(res.code == 200){
                    this.formField.fcyybqx = res.result.fcyybqx
                    this.formField.fcyyzqx = res.result.fcyyzqx
                    this.formField.fcyzyqx = res.result.fcyzyqx
                }else{
                    this.$message.warning('获取缺陷项失败')
                }
            })
        },
        segmentSubmitClick(val,isTip){
            let canHandle = false
            var that = this
            if(val == 1){
                let data = {
                    jobid:that.formField.jobid,
                    sqsxid:that.formField.sqsxid,
                    dbrid:'',
                    opinion:'',
                    smgflag:that.formField.smgflag?'是':'否',
                    map:{
                        fcyjcyj:that.formField.fcyjcyj,
                        fcyjcfw:that.formField.fcyjcfw,
                        fcyptbm:that.formField.fcyptbm,
                        fcyptry:that.formField.fcyptry,
                        fcyptryzw:that.formField.fcyptryzw,
                        fcyjg:that.formField.fcyjg,
                        fcyyzqx:that.formField.fcyyzqx,
                        fcyzyqx:that.formField.fcyzyqx,
                        fcyybqx:that.formField.fcyybqx,
                        fcyqtwt:that.formField.fcyqtwt,
                        fzlgl:that.formField.fzlgl,
                        fjgyry:that.formField.fjgyry,
                        fcfyss:that.formField.fcfyss,
                        fsb:that.formField.fsb,
                        fwlycp:that.formField.fwlycp,
                        fqryyz:that.formField.fqryyz,
                        fwjqk:that.formField.fwjqk,
                        fscgl:that.formField.fscgl,
                        fzlkzybz:that.formField.fzlkzybz,
                        fwtscyjy:that.formField.fwtscyjy,
                        fcpfyyzh:that.formField.fcpfyyzh,
                        fzj:that.formField.fzj,
                        fcyjl:that.formField.fcyjl,
                        fjcqkzs:that.formField.fjcqkzs,
                        fxzdldlm:that.formField.fxzdldlm.length?that.formField.fxzdldlm.join(','):'',
                    }
                }
                addServe(data).then(res=>{
                    if(res.code == 200){
                        that.$emit('successReturn',true)
                        if(!isTip){
                            that.$message.success(res.message)
                        }
                        
                    }else{
                        that.$message.warning(res.message)
                    }
                })
            }else if(val == 2){

                this.inspectionReportForm.validateFields((err, values) => {
                    if(!err){
                        // this.$confirm({
                        //     title:'确认提交吗？',
                        //     onOk() {
                        //         let data = {
                        //             jobid:that.formField.jobid,
                        //             sqsxid:that.formField.sqsxid,
                        //             // dbrid:values.dbrid.join(','),
                        //             // opinion:values.opinion,
                        //             smgflag:that.formField.smgflag?'是':'否',
                        //             map:{
                        //                 fcyjcyj:that.formField.fcyjcyj,
                        //                 fcyjcfw:that.formField.fcyjcfw,
                        //                 fcyptbm:that.formField.fcyptbm,
                        //                 fcyptry:that.formField.fcyptry,
                        //                 fcyptryzw:that.formField.fcyptryzw,
                        //                 fcyjg:that.formField.fcyjg,
                        //                 fcyyzqx:that.formField.fcyyzqx,
                        //                 fcyzyqx:that.formField.fcyzyqx,
                        //                 fcyybqx:that.formField.fcyybqx,
                        //                 fcyqtwt:that.formField.fcyqtwt,
                        //                 fzlgl:that.formField.fzlgl,
                        //                 fjgyry:that.formField.fjgyry,
                        //                 fcfyss:that.formField.fcfyss,
                        //                 fsb:that.formField.fsb,
                        //                 fwlycp:that.formField.fwlycp,
                        //                 fqryyz:that.formField.fqryyz,
                        //                 fwjqk:that.formField.fwjqk,
                        //                 fscgl:that.formField.fscgl,
                        //                 fzlkzybz:that.formField.fzlkzybz,
                        //                 fwtscyjy:that.formField.fwtscyjy,
                        //                 fcpfyyzh:that.formField.fcpfyyzh,
                        //                 fzj:that.formField.fzj,
                        //                 fcyjl:that.formField.fcyjl,
                        //                 fjcqkzs:that.formField.fjcqkzs,
                        //                 fxzdldlm:that.formField.fxzdldlm.length?that.formField.fxzdldlm.join(','):'',
                        //             }
                        //         }
                        //         editServe(data).then(res=>{
                        //             if(res.code == 200){
                        //                 that.$emit('successReturn',false)
                        //                 that.$message.success(res.message)
                        //             }else{
                        //                 that.$message.warning(res.message)
                        //             }
                        //         })
                        //     }
                        // })
                        this.segmentSubmitClick(1,true)
                        canHandle = true
                    }else{
                        for(let key in err){
                            that.$message.warning(err[key].errors[0].message)
                            return false
                        }
                        
                    }
                })
                return canHandle
            }else if(val == '审评中心意见'){
                let data = {
                    jobid:that.formField.jobid,
                    sqsxid:that.formField.sqsxid,
                    map:{
                        fspzxyjjg:that.formField.fspzxyjjg,
                        fspzxyj:that.formField.fspzxyj,
                    }
                }
                addServe(data).then(res=>{
                    if(res.code == 200){
                        that.$emit('successReturn',true)
                        that.$message.success(res.message)
                    }else{
                        that.$message.warning(res.message)
                    }
                })
            }
        },
        pdfAfterClose(){
            //console.log('弹窗有回调吗？')
        }
    }
}
</script>
<style lang="less">
.segment-content-box{
    .ant-tabs{
        margin-top: 20px;
    }
    .ant-tabs-nav .ant-tabs-tab-active {
        color: #5ca3e5;
        background: #5ca3e5;
        color: #fff;
        border-top-left-radius: 10px;
    }
    .ant-tabs-ink-bar{
        background: #5ca3e5 !important;
    }
    .ant-tabs-tab-active:hover{
        color: #fff !important;
    }
    // .ant-tabs-nav .ant-tabs-tab:hover{
    //     color: #fff !important;
    // }
}
.btn-only{
    .ant-form-item-control-wrapper{
        margin-left: 142px;
        margin-top: 20px;
    }
}
.segment-long-box{
    margin-top: 15px;
    width: 100%;
    .ant-form-item-control-wrapper{
        width: 80%;
    }
    .ant-form-item-children{
        display: flex;
    }
}
.basic-long-box{
    width: 100%;
    .ant-form-item-control-wrapper{
        width: 100%;
    }
    
}
.label-box-w{
    .ant-form-item-label{
        width: 142px;
    }
}
.tree-left-box{
    width: 240px;
    padding: 15px;
    height: 480px;
    overflow: auto;
}
.tree-right-box{
    min-width: 1000px;
}

.review-records-box{
    position: absolute;
    top: 0;
}
.accompany-form-item{
    position: relative;
}
.select-accompany{
    position: absolute;
    top: 26px;
    width: 183px;
    z-index: 9999;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    border-left: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
    .select-accompany-item{
        padding-left: 15px;
        border-bottom: 1px solid #e5e5e5;
    }
}
</style>